![]() |
CloseCPort |
||||
Header: | Quickdraw.h | Carbon status: | Unsupported | |
Closes a color graphics port.
void CloseCPort ( CGrafPtr port );
A pointer to a CGrafPort structure.
Normally, your application does not need to call the CloseCPort function. The Window Manager calls this function to close or dispose of a window, and the DisposeGWorld function calls it to dispose of an offscreen graphics world containing a color graphics port.
The CloseCPort function disposes of the visRgn, clipRgn, bkPixPat, pnPixPat, fillPixPat, and grafVars handles. It also disposes the graphics port’s pixel map, but it does not dispose the pixel map’s color table. If you have placed your own color table into the pixel map, either dispose of it before calling CloseCPort or store another reference.
The CloseCPort function may move or purge memory blocks in the application heap; do not call this function at interrupt time.
Not supported in Carbon. Not available in CarbonLib, but available when InterfaceLib 7.1 or later is installed. Exported by InterfaceLib 7.1 and later.
Carbon applications should use CreateNewPort and DisposePort to open and close graphics ports.
© 2000 Apple Computer, Inc. — (Last Updated 4/14/2000)